wayland: Use popup parents
authorMatthias Clasen <mclasen@redhat.com>
Mon, 22 Apr 2019 15:21:45 +0000 (15:21 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 28 May 2019 20:25:14 +0000 (20:25 +0000)
Make the Wayland move-to-rect implementation
use popup parents.

gdk/wayland/gdksurface-wayland.c

index e11f9dceb90ed791e362ab5c8d494c4513161c32..f5c209cebe06be47efe4094949dd5c4c91117eb1 100644 (file)
@@ -549,6 +549,8 @@ _gdk_wayland_display_create_surface (GdkDisplay     *display,
   if (parent == NULL)
     display_wayland->toplevels = g_list_prepend (display_wayland->toplevels, surface);
 
+  impl->transient_for = parent;
+
   gdk_wayland_surface_create_surface (surface);
 
   g_signal_connect (frame_clock, "before-paint", G_CALLBACK (on_frame_clock_before_paint), surface);
@@ -2293,6 +2295,9 @@ should_map_as_popup (GdkSurface *surface)
 {
   GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
 
+  if (GDK_SURFACE_TYPE (surface) == GDK_SURFACE_POPUP)
+    return TRUE;
+
   /* Ideally, popup would be temp surfaces with a parent and grab */
   if (GDK_SURFACE_TYPE (surface) == GDK_SURFACE_TEMP)
     {